/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package epam_java.telephone.services;

import epam_java.telephone.bill.Bill;
import java.io.PrintWriter;

/**
 *
 * @author 1
 */
public class BellService extends AbstractService{

 public BellService(String name, String description, int serviceNumber, double priceUnit, String unitsValue) {
        this.name = name;
        this.description = description;
        this.serviceNumber = serviceNumber;
        this.priceUnit = priceUnit;
        this.unitsValue = unitsValue;
    }
 @Override
 public Bill doService(PrintWriter streamout){
      int serviceduration=(int)Math.round(Math.random()*100);
      streamout.println("<br>Вы воспользовались услугой: "+this.getName());
      streamout.println("<br>Описание услуги: "+this.getDescription());
      streamout.println(" Длительность услуги: "+serviceduration);
      return new Bill(this,false,serviceduration);
  }

}
